package cn.ddy.crud.dao;

import cn.ddy.crud.beans.User;
import cn.ddy.crud.utils.DataProvider;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author ddy
 * @create 2020-08-18 17:58:40
 */
@Repository
public class UserDao {

    public List<User> getUsers(){
        return DataProvider.users;
    }

    public void delById(Integer id) {
        DataProvider.users.remove(id-1);
    }
}
